package model;

import engine.Cell;
import engine.State;
import engine.StateEvent;
import engine.StatemachineModel;

/**
 * Motile cell. Does very little.
 *
 * @author Ricardo Cruz {@literal <ricardo.pdm.cruz@gmail.com>}
 * @since  2014-11-17
 */
public class MCell extends Cell
{
	private enum MyState implements State {
		NAIVE;
		public String getName() { return toString(); }
		public int getNbr() { return ordinal(); }
	}

	public enum MyEvent implements StateEvent {
		;
		public String getName() { return null; }
	}

	private static class MyStatemachine extends StatemachineModel<MyState,MyEvent> {
		public MyStatemachine() {
			super(MyState.class, MyEvent.class);
		}
	}

	private static MyStatemachine model = new MyStatemachine();

	/**
	 * New motile cell.
	 * @param parent parent cell
	 */
	protected MCell(double x, double y) {
		super(x, y, new MyStatemachine(), MyState.NAIVE);
	}

	public int getType() { return 1; }

	@SuppressWarnings("rawtypes")
	public static StatemachineModel getModel() { return model; }
}
